package br.com.ffm.si.sysbolaodacopade2014.daoM;


import java.util.ArrayList;
import java.util.List;

import br.com.ffm.si.sysbolaodacopade2014.interfaces.ITimeDao;
import br.com.ffm.si.sysbolaodacopade2014.model.Time;

public class TimeDaoImpMemoria implements ITimeDao{
	
	ArrayList <Time> times = new ArrayList<Time> ();

	@Override
	public void salvarTime(Time time) {
		if (!(times.contains(time)));
		times.add(time);
		
	}

	@Override
	public List<Time> list() {
		return times;
	}

	@Override
	public void remover(Time time) {
		if (times.contains(time));
		remover(time);
		
	}

	@Override
	public void atualizar(Time time) {
		if (times.contains(time));
		atualizar(time);
		
	}

	@Override
	public Time getTime(String id) {
		if(times.contains(id));
		return null;
	}
	
}
